<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use Illuminate\Support\Facades\Route;

//Route::get('/', function () {
//    return view('welcome');
//});
//后台路由部分
Route::prefix('admin')->group(function (){
    //后台登录页面
    Route::any('manager/login','Admin\ManagerController@login')-> name('login');
    Route::post('manager/check','Admin\ManagerController@check');
    Route::get('manager/logout','Admin\ManagerController@logout');
    Route::get('index/index','Admin\IndexController@index');
    Route::get('member/list','Admin\MemberController@list');

    //list 禁用 启用
    Route::any('member/stop/{id}','Admin\MemberController@stop');
    Route::any('member/start/{id}','Admin\MemberController@start');
    Route::any('member/del/{id}','Admin\MemberController@del');
    Route::get('member/edit/{id}','Admin\MemberController@edit');
    Route::post('member/upload','Admin\MemberController@upload');
    Route::post('member/edit_up','Admin\MemberController@edit_up');
    Route::get('member/add','Admin\MemberController@add');
    Route::post('member/add_up','Admin\MemberController@add_up');
    Route::post('member/all_del','Admin\MemberController@all_del');

    //分类
    Route::get('classify/cate','Admin\ClassifyController@cate');
    Route::any('classify/stop/{id}','Admin\ClassifyController@stop');
    Route::any('classify/start/{id}','Admin\ClassifyController@start');
    Route::any('classify/del/{id}','Admin\ClassifyController@del');
    Route::get('classify/edit/{id}','Admin\ClassifyController@edit');
    Route::post('classify/edit_up','Admin\ClassifyController@edit_up');
    Route::post('classify/add_up','Admin\ClassifyController@add_up');

    //桌面
    Route::get('desk/welcome','Admin\DeskController@welcome');
    //文章
    Route::get('topic/topic','Admin\TopicController@topic');
    Route::any('topic/del/{id}','Admin\TopicController@del');
    Route::post('topic/all_del','Admin\TopicController@all_del');
    Route::get('topic/edit/{id}','Admin\TopicController@edit');
    Route::post('topic/upload','Admin\TopicController@upload');
    Route::post('topic/edit_up','Admin\TopicController@edit_up');
    Route::get('topic/add','Admin\TopicController@add');
    Route::post('topic/add_up','Admin\TopicController@add_up');

    //相册栏目
    Route::get('photoalbum/column','Admin\PhotoalbumController@column');
    Route::any('photoalbum/stop/{id}','Admin\PhotoalbumController@stop');
    Route::any('photoalbum/start/{id}','Admin\PhotoalbumController@start');
    Route::any('photoalbum/del/{id}','Admin\PhotoalbumController@del');
    Route::get('photoalbum/edit/{id}','Admin\PhotoalbumController@edit');
    Route::post('photoalbum/edit_up','Admin\PhotoalbumController@edit_up');
    Route::post('photoalbum/add_up','Admin\PhotoalbumController@add_up');
    //相册列表
    Route::get('albumlist/list','Admin\AlbumlistController@list');
    Route::any('albumlist/del/{id}','Admin\AlbumlistController@del');
    Route::post('albumlist/all_del','Admin\AlbumlistController@all_del');
    Route::get('albumlist/edit/{id}','Admin\AlbumlistController@edit');
    Route::post('albumlist/upload','Admin\AlbumlistController@upload');
    Route::post('albumlist/edit_up','Admin\AlbumlistController@edit_up');
    Route::get('albumlist/add','Admin\AlbumlistController@add');
    Route::post('albumlist/add_up','Admin\AlbumlistController@add_up');

    //留言
    Route::get('message/list','Admin\MessageController@list');
    Route::any('message/del/{id}','Admin\MessageController@del');
});
 
 //登录注册
 Route::post('/home/api/login','Home\ApiController@login');
 Route::any('/home/api/register','Home\ApiController@register');
     //留言
 Route::any('/home/api/leavemessage','Home\ApiController@leavemessage');






